package adv5;

import java.io.File;
import java.io.FileInputStream;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileRead2 {
    //一次读完
    public static void main(String[] args) {
        File f=new File("javaAdvance/src/adv5/FilePath.java");

        try {
            FileInputStream fin=new FileInputStream(f);
            byte b[]=new byte[fin.available()];//文件不能太大
            int len= fin.read(b);//一次读
            String s=new String(b,0,len);
            System.out.println(s);
            fin.close();//?
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
